using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using SongsDB;
using mmPodcasts;

namespace TestMMPodcasts
{
    public partial class Form1 : Form
    {
        private SDBApplicationClass app;
        private PodcastsPlugin plugin;

        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {

            // Register plugin
            plugin = new PodcastsPlugin();
            plugin.init(app, null);

            // Register with options panel
            optionsSheet1.init(plugin, app);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            if (plugin != null)
                plugin.updateDirectory();
            else
            { }
        }

        private void button3_Click(object sender, EventArgs e)
        {
            plugin.populateChannel();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            plugin.selectionChanged();
        }

        private void button5_Click(object sender, EventArgs e)
        {
            plugin.downloadPodcasts();
        }

        private void button6_Click(object sender, EventArgs e)
        {

            // Start Media Monkey
            app = new SDBApplicationClass();
        }
    }
}